import { HooksDemos } from "@/lib/@docs/demos/src";
import { Layout } from "@/layout";
import { MDX_DATA } from "@/mdx";

export default Layout(MDX_DATA.useOs);

## Usage

`use-os` returns user's os. Possible values are: `undetermined`, `macos`, `ios`, `windows`, `android`, `linux`.
If the OS cannot be identified, for example, during server side rendering `undetermined` will be returned.

<Demo data={HooksDemos.useOsDemo} />

## OS type

You can import `OS` union type from `@mantine/hooks`:

```tsx
import type { OS } from "@mantine/hooks";

// OS type is 'undetermined' | 'macos' | 'ios' | 'windows' | 'android' | 'linux'
```

## Definition

```tsx
function getOS(options?: {
  getValueInEffect: boolean;
}): "undetermined" | "macos" | "ios" | "windows" | "android" | "linux";
```
